using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public abstract class StateMachine
{
    public State currentState { get; protected set; }


    public void Init(State newState)
    {
        currentState = newState;
        currentState.Enter();
    }


    public void ChangeState(State newState)
    {
        currentState.Exit();
        currentState = newState;
        currentState.Enter();
    }
}
